package com.ln.controller;

import com.ln.service.StockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/12/8 16:01
 */
@RestController
@RequestMapping("/stock")
public class StockController {

    @Autowired
    private StockService stockService;
    @GetMapping("/{isbn}")
    public String incr(@PathVariable int isbn){
        return stockService.decrement(isbn);
    }
}
